package pl.ydp.components.mathcell.mathrecognizer.engine.database.modelsets.math_basic.characters
{
	import pl.ydp.components.mathcell.mathrecognizer.characters.Character;
	import pl.ydp.components.mathcell.mathrecognizer.geometry.classification.PrimitiveType;
	import pl.ydp.components.mathcell.mathrecognizer.model.PrimitivesRelation;
	import pl.ydp.components.mathcell.mathrecognizer.model.RelationDescription;
	import pl.ydp.components.mathcell.mathrecognizer.model.RelationDescriptorType;
	import pl.ydp.components.mathcell.mathrecognizer.model.ShapeModel;
	import pl.ydp.components.mathcell.mathrecognizer.model.descriptors.CrossDescriptior;
	import pl.ydp.components.mathcell.mathrecognizer.model.descriptors.LocationDescriptor;
	import pl.ydp.components.mathcell.mathrecognizer.model.descriptors.ObjectDescriptor;
	import pl.ydp.components.mathcell.mathrecognizer.model.presets.PrimitivePresets;
	
	public class MB_ch_mulx
	{
		public static const MODELS_COUNT:Number = 1;
		
		//---------------------------------------------------
		
		public static function getModels():Array{
			
			var multiplyShapeModels:Array = new Array();
			
			multiplyShapeModels.push(getModel0());		
			
			return multiplyShapeModels;
		}
		

		//---------------------------------------------------
		
		private static function getModel0():ShapeModel{
			var multiply:ShapeModel;
			var name:String = "MB_*_X";
			var multiply_prim:Array = new Array();
			var multiply_ref:Array = new Array();
			var multiply_rel:Array = new Array();
			
			multiply_prim.push(PrimitiveType.LINE1, PrimitiveType.LINE3);
			
			multiply_ref.push(0,1,PrimitivePresets.RLT_LOWER_QUARTER);
			
			multiply_rel.push(new RelationDescription(0,1,new PrimitivesRelation(RelationDescriptorType.CROSS, CrossDescriptior.CROSSING, 10)));
			
			multiply_rel.push(new RelationDescription(0,1,new PrimitivesRelation(RelationDescriptorType.LOCATION, LocationDescriptor.INSIDE, 10)));
			
			multiply_rel.push(new RelationDescription(1,0,new PrimitivesRelation(RelationDescriptorType.LOCATION, LocationDescriptor.INSIDE, 10)));
			
			multiply_rel.push(new RelationDescription(1,2,new PrimitivesRelation(RelationDescriptorType.LOCATION, LocationDescriptor.INSIDE, 10, ObjectDescriptor.END_WESTERN)));		
			
			multiply = new ShapeModel(Character.MULTIPLY_X, multiply_prim, multiply_ref, multiply_rel, new Array(), name);
			
			return multiply;						
		}

	}
}